The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. Computer systems typically include a combination of hardware (such as semiconductors, integrated circuits, programmable logic devices, programmable gate arrays, and circuit boards) and software, also known as computer programs.
Years ago, computers were stand-alone devices, and all the data that a user needed was stored on the single computer. But today, computers are increasingly connected in networks, and data may be distributed across multiple computers, and each of these computers may have independent subsystems. For example, a web commerce site may have several distributed web servers, application servers, transaction servers, and database servers, and these servers may run on different platforms using different operating systems running on different hardware.
The Enterprise JavaBeans (EJB) component architecture is designed to enable enterprises to build distributed, multi-platform, applications as reusable, server-side components. Its purpose is to solve the enterprise problems by allowing the enterprise developer to focus only on writing business logic instead of focusing on the problems of distributed data and multiple platforms. The Enterprise Java Beans specification creates an infrastructure that handles the system-level programming, such as transactions, security, threading, naming, object-life cycle, resource pooling, remote access, and persistence. EJB also simplifies access to existing applications, and provides a uniform application development model for tool creation use using object-oriented programming techniques.
Object-oriented programming techniques involve the definition, creation, use, and instruction of “objects”. These objects are software entities comprising data elements or attributes and methods, which manipulate data elements. Objects also may include data related to events outside of the object to trigger or control methods within the object.
Java is an object-oriented programming language and environment focusing on defining data as objects and the methods that may be applied to those objects. Java supports only a single inheritance, meaning that each class can inherit from only one other class at any given time. Java also allows for the creation of totally abstract classes known as interfaces, which allow the defining of methods that may be shared with several classes without regard for how other classes are handling the methods.
The Java virtual machine (JVM) is a virtual computer component that resides in memory. In some cases, the JVM may be implemented in a processor. The JVM allows Java programs to be executed on a different platform as opposed to only the one platform for which the code was compiled. Java programs are compiled for the JVM. In this manner, Java is able to support applications for many types of data processing systems, which may contain a variety of central processing units and operating systems architectures.
To enable a Java application to execute on different types of data processing systems, a compiler typically generates an architecture-neutral file format—the compiled code is executable on many processors, given the presence of the Java run-time system. The Java compiler generates bytecode instructions that are non-specific to a particular computer architecture. These bytecodes are executed by a Java interpreter. A Java interpreter is a module in the JVM that alternately decodes and executes a bytecode or bytecodes.
A Java bean is a reusable component in a Java application that may be executed using the Java interpreter. Various programs in Java may be created by aggregating different Java beans. Some examples of business objects are customers, orders, and products. In the J2EE (Java 2 Platform Enterprise Edition) SDK (Software Development Kit), the persistent storage mechanism is a relational database. Typically, each entity bean has an underlying table in a relational database, and each instance of the bean corresponds to a row in that table.
A distributed J2EE application uses a datasource to access a database. Configuration of the datasource is error prone since it involves input of parameters from the user. If the datasource is configured on multiple machines or servers, as is common in a distributed environment, checking the validity of the datasource is not possible until the application has been written, deployed, and a test run attempted.
Without a better way to test a database connection, users will be unable to enjoy the full advantages of distributed data. Although the aforementioned problems have been described in the context of the Enterprise Java Bean specification, they can occur in any environment.